package com.yzt.zhuju.network.entity.gift;

import com.yzt.zhuju.network.base.BaseBean;

import java.util.Objects;

/**
 * author : bob
 * date   : 2022/12/2
 * desc   :
 */
public class GiftBasisInfo  extends BaseBean {

    private String fromName;
    private String toName;
    private int giftId;
    private int index;

    public GiftBasisInfo(){

    }

    public GiftBasisInfo(SendGiftAnimViewInfo info, int index){
        this.fromName = info.getFromNick();
        this.toName = info.getToNick();
        this.giftId = info.getGiftId();
        this.index = index;
    }

    public GiftBasisInfo(SendGiftAnimViewInfo info){
        this.fromName = info.getFromNick();
        this.toName = info.getToNick();
        this.giftId = info.getGiftId();
    }

    public String getFromName() {
        return fromName;
    }

    public void setFromName(String fromName) {
        this.fromName = fromName;
    }

    public String getToName() {
        return toName;
    }

    public void setToName(String toName) {
        this.toName = toName;
    }

    public int getGiftId() {
        return giftId;
    }

    public void setGiftId(int giftId) {
        this.giftId = giftId;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    @Override
    public String toString() {
        return "GiftBasisInfo{" +
                "fromName='" + fromName + '\'' +
                ", toName='" + toName + '\'' +
                ", giftId=" + giftId +
                ", index=" + index +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GiftBasisInfo that = (GiftBasisInfo) o;
        return giftId == that.giftId &&
                Objects.equals(fromName, that.fromName) &&
                Objects.equals(toName, that.toName);
    }

}
